3.5.62 \(\int \frac {(c+d \sin (e+f x))^4}{(3+3 \sin (e+f x))^2} \, dx\) [462]

3.5.62.1 Optimal result
3.5.62.2 Mathematica [B] (verified)
3.5.62.3 Rubi [A] (verified)
3.5.62.4 Maple [A] (verified)
3.5.62.5 Fricas [B] (verification not implemented)
3.5.62.6 Sympy [B] (verification not implemented)
3.5.62.7 Maxima [B] (verification not implemented)
3.5.62.8 Giac [A] (verification not implemented)
3.5.62.9 Mupad [B] (verification not implemented)

3.5.62.1 Optimal result

Integrand size = 25, antiderivative size = 183 \[ \int \frac {(c+d \sin (e+f x))^4}{(3+3 \sin (e+f x))^2} \, dx=\frac {1}{18} d^2 \left (12 c^2-16 c d+7 d^2\right ) x+\frac {2 d \left (c^3+8 c^2 d-20 c d^2+8 d^3\right ) \cos (e+f x)}{27 f}+\frac {d^2 \left (2 c^2+16 c d-21 d^2\right ) \cos (e+f x) \sin (e+f x)}{54 f}-\frac {(c-d) (c+8 d) \cos (e+f x) (c+d \sin (e+f x))^2}{27 f (1+\sin (e+f x))}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (3+3 \sin (e+f x))^2} \]

output
1/2*d^2*(12*c^2-16*c*d+7*d^2)*x/a^2+2/3*d*(c^3+8*c^2*d-20*c*d^2+8*d^3)*cos 
(f*x+e)/a^2/f+1/6*d^2*(2*c^2+16*c*d-21*d^2)*cos(f*x+e)*sin(f*x+e)/a^2/f-1/ 
3*(c-d)*(c+8*d)*cos(f*x+e)*(c+d*sin(f*x+e))^2/a^2/f/(1+sin(f*x+e))-1/3*(c- 
d)*cos(f*x+e)*(c+d*sin(f*x+e))^3/f/(a+a*sin(f*x+e))^2
 
3.5.62.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(375\) vs. \(2(183)=366\).

Time = 1.38 (sec) , antiderivative size = 375, normalized size of antiderivative = 2.05 \[ \int \frac {(c+d \sin (e+f x))^4}{(3+3 \sin (e+f x))^2} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (3 d \left (64 c^3+48 c^2 d (-4+3 e+3 f x)-32 c d^2 (-5+6 e+6 f x)+7 d^3 (-7+12 e+12 f x)\right ) \cos \left (\frac {1}{2} (e+f x)\right )-\left (16 c^4+128 c^3 d+48 c^2 d^2 (-10+3 e+3 f x)-16 c d^3 (-41+12 e+12 f x)+d^4 (-239+84 e+84 f x)\right ) \cos \left (\frac {3}{2} (e+f x)\right )+3 \left ((16 c-5 d) d^3 \cos \left (\frac {5}{2} (e+f x)\right )+d^4 \cos \left (\frac {7}{2} (e+f x)\right )+2 \left (8 c^4+32 c^3 d-144 c^2 d^2+144 c d^3-50 d^4+96 c^2 d^2 e-128 c d^3 e+56 d^4 e+96 c^2 d^2 f x-128 c d^3 f x+56 d^4 f x+d^2 \left (48 c^2 (e+f x)-64 c d (1+e+f x)+d^2 (27+28 e+28 f x)\right ) \cos (e+f x)-2 (8 c-3 d) d^3 \cos (2 (e+f x))+d^4 \cos (3 (e+f x))\right ) \sin \left (\frac {1}{2} (e+f x)\right )\right )\right )}{432 f (1+\sin (e+f x))^2} \]

input
Integrate[(c + d*Sin[e + f*x])^4/(3 + 3*Sin[e + f*x])^2,x]
 
output
((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(3*d*(64*c^3 + 48*c^2*d*(-4 + 3*e + 
 3*f*x) - 32*c*d^2*(-5 + 6*e + 6*f*x) + 7*d^3*(-7 + 12*e + 12*f*x))*Cos[(e 
 + f*x)/2] - (16*c^4 + 128*c^3*d + 48*c^2*d^2*(-10 + 3*e + 3*f*x) - 16*c*d 
^3*(-41 + 12*e + 12*f*x) + d^4*(-239 + 84*e + 84*f*x))*Cos[(3*(e + f*x))/2 
] + 3*((16*c - 5*d)*d^3*Cos[(5*(e + f*x))/2] + d^4*Cos[(7*(e + f*x))/2] + 
2*(8*c^4 + 32*c^3*d - 144*c^2*d^2 + 144*c*d^3 - 50*d^4 + 96*c^2*d^2*e - 12 
8*c*d^3*e + 56*d^4*e + 96*c^2*d^2*f*x - 128*c*d^3*f*x + 56*d^4*f*x + d^2*( 
48*c^2*(e + f*x) - 64*c*d*(1 + e + f*x) + d^2*(27 + 28*e + 28*f*x))*Cos[e 
+ f*x] - 2*(8*c - 3*d)*d^3*Cos[2*(e + f*x)] + d^4*Cos[3*(e + f*x)])*Sin[(e 
 + f*x)/2])))/(432*f*(1 + Sin[e + f*x])^2)
 
3.5.62.3 Rubi [A] (verified)

Time = 0.75 (sec) , antiderivative size = 201, normalized size of antiderivative = 1.10, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {3042, 3244, 25, 3042, 3456, 3042, 3213}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(c+d \sin (e+f x))^4}{(a \sin (e+f x)+a)^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(c+d \sin (e+f x))^4}{(a \sin (e+f x)+a)^2}dx\)

\(\Big \downarrow \) 3244

\(\displaystyle -\frac {\int -\frac {(c+d \sin (e+f x))^2 \left (a \left (c^2+5 d c-3 d^2\right )-a (2 c-5 d) d \sin (e+f x)\right )}{\sin (e+f x) a+a}dx}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a \sin (e+f x)+a)^2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int \frac {(c+d \sin (e+f x))^2 \left (a \left (c^2+5 d c-3 d^2\right )-a (2 c-5 d) d \sin (e+f x)\right )}{\sin (e+f x) a+a}dx}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a \sin (e+f x)+a)^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {(c+d \sin (e+f x))^2 \left (a \left (c^2+5 d c-3 d^2\right )-a (2 c-5 d) d \sin (e+f x)\right )}{\sin (e+f x) a+a}dx}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a \sin (e+f x)+a)^2}\)

\(\Big \downarrow \) 3456

\(\displaystyle \frac {\frac {\int (c+d \sin (e+f x)) \left (a^2 (19 c-16 d) d^2-a^2 d \left (2 c^2+16 d c-21 d^2\right ) \sin (e+f x)\right )dx}{a^2}-\frac {(c-d) (c+8 d) \cos (e+f x) (c+d \sin (e+f x))^2}{f (\sin (e+f x)+1)}}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a \sin (e+f x)+a)^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\int (c+d \sin (e+f x)) \left (a^2 (19 c-16 d) d^2-a^2 d \left (2 c^2+16 d c-21 d^2\right ) \sin (e+f x)\right )dx}{a^2}-\frac {(c-d) (c+8 d) \cos (e+f x) (c+d \sin (e+f x))^2}{f (\sin (e+f x)+1)}}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a \sin (e+f x)+a)^2}\)

\(\Big \downarrow \) 3213

\(\displaystyle \frac {\frac {\frac {a^2 d^2 \left (2 c^2+16 c d-21 d^2\right ) \sin (e+f x) \cos (e+f x)}{2 f}+\frac {3}{2} a^2 d^2 x \left (12 c^2-16 c d+7 d^2\right )+\frac {2 a^2 d \left (c^3+8 c^2 d-20 c d^2+8 d^3\right ) \cos (e+f x)}{f}}{a^2}-\frac {(c-d) (c+8 d) \cos (e+f x) (c+d \sin (e+f x))^2}{f (\sin (e+f x)+1)}}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))^3}{3 f (a \sin (e+f x)+a)^2}\)

input
Int[(c + d*Sin[e + f*x])^4/(a + a*Sin[e + f*x])^2,x]
 
output
-1/3*((c - d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(f*(a + a*Sin[e + f*x]) 
^2) + (-(((c - d)*(c + 8*d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(f*(1 + S 
in[e + f*x]))) + ((3*a^2*d^2*(12*c^2 - 16*c*d + 7*d^2)*x)/2 + (2*a^2*d*(c^ 
3 + 8*c^2*d - 20*c*d^2 + 8*d^3)*Cos[e + f*x])/f + (a^2*d^2*(2*c^2 + 16*c*d 
 - 21*d^2)*Cos[e + f*x]*Sin[e + f*x])/(2*f))/a^2)/(3*a^2)
 

3.5.62.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3213
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) 
*(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co 
s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free 
Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
 

rule 3244
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
(f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e 
+ f*x])^m*((c + d*Sin[e + f*x])^(n - 1)/(a*f*(2*m + 1))), x] + Simp[1/(a*b* 
(2*m + 1))   Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n - 2)* 
Simp[b*(c^2*(m + 1) + d^2*(n - 1)) + a*c*d*(m - n + 1) + d*(a*d*(m - n + 1) 
 + b*c*(m + n))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && 
 NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] 
&& GtQ[n, 1] && (IntegersQ[2*m, 2*n] || (IntegerQ[m] && EqQ[c, 0]))
 

rule 3456
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + 
(f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim 
p[(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^n/( 
a*f*(2*m + 1))), x] - Simp[1/(a*b*(2*m + 1))   Int[(a + b*Sin[e + f*x])^(m 
+ 1)*(c + d*Sin[e + f*x])^(n - 1)*Simp[A*(a*d*n - b*c*(m + 1)) - B*(a*c*m + 
 b*d*n) - d*(a*B*(m - n) + A*b*(m + n + 1))*Sin[e + f*x], x], x], x] /; Fre 
eQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] & 
& NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && GtQ[n, 0] && IntegerQ[2*m] && (In 
tegerQ[2*n] || EqQ[c, 0])
 
3.5.62.4 Maple [A] (verified)

Time = 1.13 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.37

method result size
derivativedivides \(\frac {-\frac {2 \left (c^{4}-6 c^{2} d^{2}+8 d^{3} c -3 d^{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {-2 c^{4}+8 c^{3} d -12 c^{2} d^{2}+8 d^{3} c -2 d^{4}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (2 c^{4}-8 c^{3} d +12 c^{2} d^{2}-8 d^{3} c +2 d^{4}\right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+2 d^{2} \left (\frac {\frac {\left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) d^{2}}{2}+\left (-4 c d +2 d^{2}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2}-4 c d +2 d^{2}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}+\frac {\left (12 c^{2}-16 c d +7 d^{2}\right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )}{a^{2} f}\) \(250\)
default \(\frac {-\frac {2 \left (c^{4}-6 c^{2} d^{2}+8 d^{3} c -3 d^{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {-2 c^{4}+8 c^{3} d -12 c^{2} d^{2}+8 d^{3} c -2 d^{4}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (2 c^{4}-8 c^{3} d +12 c^{2} d^{2}-8 d^{3} c +2 d^{4}\right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+2 d^{2} \left (\frac {\frac {\left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) d^{2}}{2}+\left (-4 c d +2 d^{2}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2}-4 c d +2 d^{2}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}+\frac {\left (12 c^{2}-16 c d +7 d^{2}\right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}\right )}{a^{2} f}\) \(250\)
parallelrisch \(\frac {\left (\left (252 f x +501\right ) d^{4}+\left (-576 f x -1248\right ) c \,d^{3}+\left (432 f x +720\right ) c^{2} d^{2}-96 c^{3} d -72 c^{4}\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (\left (-84 f x +23\right ) d^{4}+\left (192 f x -80\right ) c \,d^{3}+\left (-144 f x +48\right ) c^{2} d^{2}-32 c^{3} d +8 c^{4}\right ) \cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\left (\left (252 f x +267\right ) d^{4}+\left (-576 f x -672\right ) c \,d^{3}+432 c^{2} \left (f x +1\right ) d^{2}-96 c^{3} d -24 c^{4}\right ) \sin \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (\left (84 f x +279\right ) d^{4}+\left (-192 f x -720\right ) c \,d^{3}+144 c^{2} \left (f x +3\right ) d^{2}-96 c^{3} d -24 c^{4}\right ) \sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+3 \left (\left (16 c -5 d \right ) \cos \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )+\left (-16 c +5 d \right ) \sin \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )+d \left (\cos \left (\frac {7 f x}{2}+\frac {7 e}{2}\right )+\sin \left (\frac {7 f x}{2}+\frac {7 e}{2}\right )\right )\right ) d^{3}}{24 f \,a^{2} \left (3 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )-\cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+3 \sin \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}\) \(340\)
risch \(\frac {6 d^{2} x \,c^{2}}{a^{2}}-\frac {8 d^{3} x c}{a^{2}}+\frac {7 d^{4} x}{2 a^{2}}+\frac {i d^{4} {\mathrm e}^{2 i \left (f x +e \right )}}{8 a^{2} f}-\frac {2 d^{3} {\mathrm e}^{i \left (f x +e \right )} c}{a^{2} f}+\frac {d^{4} {\mathrm e}^{i \left (f x +e \right )}}{a^{2} f}-\frac {2 d^{3} {\mathrm e}^{-i \left (f x +e \right )} c}{a^{2} f}+\frac {d^{4} {\mathrm e}^{-i \left (f x +e \right )}}{a^{2} f}-\frac {i d^{4} {\mathrm e}^{-2 i \left (f x +e \right )}}{8 a^{2} f}-\frac {2 i \left (-12 i c^{3} d \,{\mathrm e}^{2 i \left (f x +e \right )}+36 i c^{2} d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-36 i c \,d^{3} {\mathrm e}^{2 i \left (f x +e \right )}+12 i d^{4} {\mathrm e}^{2 i \left (f x +e \right )}+i c^{4}+8 i c^{3} d -30 i c^{2} d^{2}+32 i d^{3} c -11 i d^{4}+3 c^{4} {\mathrm e}^{i \left (f x +e \right )}+12 c^{3} d \,{\mathrm e}^{i \left (f x +e \right )}-54 c^{2} d^{2} {\mathrm e}^{i \left (f x +e \right )}+60 c \,d^{3} {\mathrm e}^{i \left (f x +e \right )}-21 d^{4} {\mathrm e}^{i \left (f x +e \right )}\right )}{3 f \,a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )^{3}}\) \(354\)
norman \(\frac {\frac {\left (-2 c^{4}+12 c^{2} d^{2}-16 d^{3} c +7 d^{4}\right ) \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f a}+\frac {\left (-8 c^{4}-32 c^{3} d +144 c^{2} d^{2}-240 d^{3} c +92 d^{4}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f a}+\frac {\left (-2 c^{4}-8 c^{3} d +36 c^{2} d^{2}-64 d^{3} c +25 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f a}+\frac {\left (-2 c^{4}-8 c^{3} d +36 c^{2} d^{2}-48 d^{3} c +21 d^{4}\right ) \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f a}+\frac {-4 c^{4}-8 c^{3} d +48 c^{2} d^{2}-80 d^{3} c +32 d^{4}}{3 f a}+\frac {d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x}{2 a}+\frac {\left (-28 c^{4}-8 c^{3} d +192 c^{2} d^{2}-320 d^{3} c +140 d^{4}\right ) \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f a}+\frac {2 \left (-26 c^{4}-16 c^{3} d +204 c^{2} d^{2}-376 d^{3} c +157 d^{4}\right ) \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f a}+\frac {\left (-22 c^{4}-32 c^{3} d +228 c^{2} d^{2}-416 d^{3} c +161 d^{4}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 f a}+\frac {2 \left (-8 c^{4}-8 c^{3} d +72 c^{2} d^{2}-136 d^{3} c +54 d^{4}\right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f a}+\frac {2 \left (-6 c^{4}-24 c^{3} d +108 c^{2} d^{2}-168 d^{3} c +65 d^{4}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f a}+\frac {2 \left (-4 c^{4}-16 c^{3} d +72 c^{2} d^{2}-104 d^{3} c +42 d^{4}\right ) \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f a}+\frac {3 d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 a}+\frac {7 d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {13 d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {9 d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {11 d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {11 d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {9 d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {13 d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {7 d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {3 d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {d^{2} \left (12 c^{2}-16 c d +7 d^{2}\right ) x \left (\tan ^{11}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{4} a \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}\) \(968\)

input
int((c+d*sin(f*x+e))^4/(a+a*sin(f*x+e))^2,x,method=_RETURNVERBOSE)
 
output
2/f/a^2*(-(c^4-6*c^2*d^2+8*c*d^3-3*d^4)/(tan(1/2*f*x+1/2*e)+1)-1/2*(-2*c^4 
+8*c^3*d-12*c^2*d^2+8*c*d^3-2*d^4)/(tan(1/2*f*x+1/2*e)+1)^2-1/3*(2*c^4-8*c 
^3*d+12*c^2*d^2-8*c*d^3+2*d^4)/(tan(1/2*f*x+1/2*e)+1)^3+d^2*((1/2*tan(1/2* 
f*x+1/2*e)^3*d^2+(-4*c*d+2*d^2)*tan(1/2*f*x+1/2*e)^2-1/2*d^2*tan(1/2*f*x+1 
/2*e)-4*c*d+2*d^2)/(1+tan(1/2*f*x+1/2*e)^2)^2+1/2*(12*c^2-16*c*d+7*d^2)*ar 
ctan(tan(1/2*f*x+1/2*e))))
 
3.5.62.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 440 vs. \(2 (185) = 370\).

Time = 0.27 (sec) , antiderivative size = 440, normalized size of antiderivative = 2.40 \[ \int \frac {(c+d \sin (e+f x))^4}{(3+3 \sin (e+f x))^2} \, dx=-\frac {3 \, d^{4} \cos \left (f x + e\right )^{4} - 2 \, c^{4} + 8 \, c^{3} d - 12 \, c^{2} d^{2} + 8 \, c d^{3} - 2 \, d^{4} + 6 \, {\left (4 \, c d^{3} - d^{4}\right )} \cos \left (f x + e\right )^{3} + 6 \, {\left (12 \, c^{2} d^{2} - 16 \, c d^{3} + 7 \, d^{4}\right )} f x - {\left (2 \, c^{4} + 16 \, c^{3} d - 60 \, c^{2} d^{2} + 88 \, c d^{3} - 31 \, d^{4} + 3 \, {\left (12 \, c^{2} d^{2} - 16 \, c d^{3} + 7 \, d^{4}\right )} f x\right )} \cos \left (f x + e\right )^{2} - {\left (4 \, c^{4} + 8 \, c^{3} d - 48 \, c^{2} d^{2} + 104 \, c d^{3} - 38 \, d^{4} - 3 \, {\left (12 \, c^{2} d^{2} - 16 \, c d^{3} + 7 \, d^{4}\right )} f x\right )} \cos \left (f x + e\right ) + {\left (3 \, d^{4} \cos \left (f x + e\right )^{3} + 2 \, c^{4} - 8 \, c^{3} d + 12 \, c^{2} d^{2} - 8 \, c d^{3} + 2 \, d^{4} + 6 \, {\left (12 \, c^{2} d^{2} - 16 \, c d^{3} + 7 \, d^{4}\right )} f x - 3 \, {\left (8 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{2} - {\left (2 \, c^{4} + 16 \, c^{3} d - 60 \, c^{2} d^{2} + 112 \, c d^{3} - 40 \, d^{4} - 3 \, {\left (12 \, c^{2} d^{2} - 16 \, c d^{3} + 7 \, d^{4}\right )} f x\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{6 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f \cos \left (f x + e\right ) - 2 \, a^{2} f - {\left (a^{2} f \cos \left (f x + e\right ) + 2 \, a^{2} f\right )} \sin \left (f x + e\right )\right )}} \]

input
integrate((c+d*sin(f*x+e))^4/(a+a*sin(f*x+e))^2,x, algorithm="fricas")
 
output
-1/6*(3*d^4*cos(f*x + e)^4 - 2*c^4 + 8*c^3*d - 12*c^2*d^2 + 8*c*d^3 - 2*d^ 
4 + 6*(4*c*d^3 - d^4)*cos(f*x + e)^3 + 6*(12*c^2*d^2 - 16*c*d^3 + 7*d^4)*f 
*x - (2*c^4 + 16*c^3*d - 60*c^2*d^2 + 88*c*d^3 - 31*d^4 + 3*(12*c^2*d^2 - 
16*c*d^3 + 7*d^4)*f*x)*cos(f*x + e)^2 - (4*c^4 + 8*c^3*d - 48*c^2*d^2 + 10 
4*c*d^3 - 38*d^4 - 3*(12*c^2*d^2 - 16*c*d^3 + 7*d^4)*f*x)*cos(f*x + e) + ( 
3*d^4*cos(f*x + e)^3 + 2*c^4 - 8*c^3*d + 12*c^2*d^2 - 8*c*d^3 + 2*d^4 + 6* 
(12*c^2*d^2 - 16*c*d^3 + 7*d^4)*f*x - 3*(8*c*d^3 - 3*d^4)*cos(f*x + e)^2 - 
 (2*c^4 + 16*c^3*d - 60*c^2*d^2 + 112*c*d^3 - 40*d^4 - 3*(12*c^2*d^2 - 16* 
c*d^3 + 7*d^4)*f*x)*cos(f*x + e))*sin(f*x + e))/(a^2*f*cos(f*x + e)^2 - a^ 
2*f*cos(f*x + e) - 2*a^2*f - (a^2*f*cos(f*x + e) + 2*a^2*f)*sin(f*x + e))
 
3.5.62.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 8950 vs. \(2 (185) = 370\).

Time = 7.93 (sec) , antiderivative size = 8950, normalized size of antiderivative = 48.91 \[ \int \frac {(c+d \sin (e+f x))^4}{(3+3 \sin (e+f x))^2} \, dx=\text {Too large to display} \]

input
integrate((c+d*sin(f*x+e))**4/(a+a*sin(f*x+e))**2,x)
 
output
Piecewise((-12*c**4*tan(e/2 + f*x/2)**6/(6*a**2*f*tan(e/2 + f*x/2)**7 + 18 
*a**2*f*tan(e/2 + f*x/2)**6 + 30*a**2*f*tan(e/2 + f*x/2)**5 + 42*a**2*f*ta 
n(e/2 + f*x/2)**4 + 42*a**2*f*tan(e/2 + f*x/2)**3 + 30*a**2*f*tan(e/2 + f* 
x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 12*c**4*tan(e/2 + f*x/2 
)**5/(6*a**2*f*tan(e/2 + f*x/2)**7 + 18*a**2*f*tan(e/2 + f*x/2)**6 + 30*a* 
*2*f*tan(e/2 + f*x/2)**5 + 42*a**2*f*tan(e/2 + f*x/2)**4 + 42*a**2*f*tan(e 
/2 + f*x/2)**3 + 30*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2 
) + 6*a**2*f) - 32*c**4*tan(e/2 + f*x/2)**4/(6*a**2*f*tan(e/2 + f*x/2)**7 
+ 18*a**2*f*tan(e/2 + f*x/2)**6 + 30*a**2*f*tan(e/2 + f*x/2)**5 + 42*a**2* 
f*tan(e/2 + f*x/2)**4 + 42*a**2*f*tan(e/2 + f*x/2)**3 + 30*a**2*f*tan(e/2 
+ f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 24*c**4*tan(e/2 + f 
*x/2)**3/(6*a**2*f*tan(e/2 + f*x/2)**7 + 18*a**2*f*tan(e/2 + f*x/2)**6 + 3 
0*a**2*f*tan(e/2 + f*x/2)**5 + 42*a**2*f*tan(e/2 + f*x/2)**4 + 42*a**2*f*t 
an(e/2 + f*x/2)**3 + 30*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f 
*x/2) + 6*a**2*f) - 28*c**4*tan(e/2 + f*x/2)**2/(6*a**2*f*tan(e/2 + f*x/2) 
**7 + 18*a**2*f*tan(e/2 + f*x/2)**6 + 30*a**2*f*tan(e/2 + f*x/2)**5 + 42*a 
**2*f*tan(e/2 + f*x/2)**4 + 42*a**2*f*tan(e/2 + f*x/2)**3 + 30*a**2*f*tan( 
e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 12*c**4*tan(e/2 
 + f*x/2)/(6*a**2*f*tan(e/2 + f*x/2)**7 + 18*a**2*f*tan(e/2 + f*x/2)**6 + 
30*a**2*f*tan(e/2 + f*x/2)**5 + 42*a**2*f*tan(e/2 + f*x/2)**4 + 42*a**2...
 
3.5.62.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 908 vs. \(2 (185) = 370\).

Time = 0.31 (sec) , antiderivative size = 908, normalized size of antiderivative = 4.96 \[ \int \frac {(c+d \sin (e+f x))^4}{(3+3 \sin (e+f x))^2} \, dx=\text {Too large to display} \]

input
integrate((c+d*sin(f*x+e))^4/(a+a*sin(f*x+e))^2,x, algorithm="maxima")
 
output
1/3*(d^4*((75*sin(f*x + e)/(cos(f*x + e) + 1) + 97*sin(f*x + e)^2/(cos(f*x 
 + e) + 1)^2 + 126*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 98*sin(f*x + e)^4 
/(cos(f*x + e) + 1)^4 + 63*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 21*sin(f* 
x + e)^6/(cos(f*x + e) + 1)^6 + 32)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e 
) + 1) + 5*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 7*a^2*sin(f*x + e)^3/ 
(cos(f*x + e) + 1)^3 + 7*a^2*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 5*a^2*s 
in(f*x + e)^5/(cos(f*x + e) + 1)^5 + 3*a^2*sin(f*x + e)^6/(cos(f*x + e) + 
1)^6 + a^2*sin(f*x + e)^7/(cos(f*x + e) + 1)^7) + 21*arctan(sin(f*x + e)/( 
cos(f*x + e) + 1))/a^2) - 16*c*d^3*((12*sin(f*x + e)/(cos(f*x + e) + 1) + 
11*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 9*sin(f*x + e)^3/(cos(f*x + e) + 
1)^3 + 3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 5)/(a^2 + 3*a^2*sin(f*x + e 
)/(cos(f*x + e) + 1) + 4*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4*a^2*s 
in(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*a^2*sin(f*x + e)^4/(cos(f*x + e) + 
1)^4 + a^2*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*arctan(sin(f*x + e)/(c 
os(f*x + e) + 1))/a^2) + 12*c^2*d^2*((9*sin(f*x + e)/(cos(f*x + e) + 1) + 
3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4)/(a^2 + 3*a^2*sin(f*x + e)/(cos( 
f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x + 
e)^3/(cos(f*x + e) + 1)^3) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^2 
) - 2*c^4*(3*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f*x + e)^2/(cos(f*x + 
 e) + 1)^2 + 2)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*si...
 
3.5.62.8 Giac [A] (verification not implemented)

Time = 0.47 (sec) , antiderivative size = 322, normalized size of antiderivative = 1.76 \[ \int \frac {(c+d \sin (e+f x))^4}{(3+3 \sin (e+f x))^2} \, dx=\frac {\frac {3 \, {\left (12 \, c^{2} d^{2} - 16 \, c d^{3} + 7 \, d^{4}\right )} {\left (f x + e\right )}}{a^{2}} + \frac {6 \, {\left (d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 8 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4 \, d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 8 \, c d^{3} + 4 \, d^{4}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}^{2} a^{2}} - \frac {4 \, {\left (3 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 18 \, c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 24 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 9 \, d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 12 \, c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 54 \, c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 60 \, c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 21 \, d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, c^{4} + 4 \, c^{3} d - 24 \, c^{2} d^{2} + 28 \, c d^{3} - 10 \, d^{4}\right )}}{a^{2} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}}}{6 \, f} \]

input
integrate((c+d*sin(f*x+e))^4/(a+a*sin(f*x+e))^2,x, algorithm="giac")
 
output
1/6*(3*(12*c^2*d^2 - 16*c*d^3 + 7*d^4)*(f*x + e)/a^2 + 6*(d^4*tan(1/2*f*x 
+ 1/2*e)^3 - 8*c*d^3*tan(1/2*f*x + 1/2*e)^2 + 4*d^4*tan(1/2*f*x + 1/2*e)^2 
 - d^4*tan(1/2*f*x + 1/2*e) - 8*c*d^3 + 4*d^4)/((tan(1/2*f*x + 1/2*e)^2 + 
1)^2*a^2) - 4*(3*c^4*tan(1/2*f*x + 1/2*e)^2 - 18*c^2*d^2*tan(1/2*f*x + 1/2 
*e)^2 + 24*c*d^3*tan(1/2*f*x + 1/2*e)^2 - 9*d^4*tan(1/2*f*x + 1/2*e)^2 + 3 
*c^4*tan(1/2*f*x + 1/2*e) + 12*c^3*d*tan(1/2*f*x + 1/2*e) - 54*c^2*d^2*tan 
(1/2*f*x + 1/2*e) + 60*c*d^3*tan(1/2*f*x + 1/2*e) - 21*d^4*tan(1/2*f*x + 1 
/2*e) + 2*c^4 + 4*c^3*d - 24*c^2*d^2 + 28*c*d^3 - 10*d^4)/(a^2*(tan(1/2*f* 
x + 1/2*e) + 1)^3))/f
 
3.5.62.9 Mupad [B] (verification not implemented)

Time = 9.28 (sec) , antiderivative size = 478, normalized size of antiderivative = 2.61 \[ \int \frac {(c+d \sin (e+f x))^4}{(3+3 \sin (e+f x))^2} \, dx=\frac {d^2\,\mathrm {atan}\left (\frac {d^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (12\,c^2-16\,c\,d+7\,d^2\right )}{12\,c^2\,d^2-16\,c\,d^3+7\,d^4}\right )\,\left (12\,c^2-16\,c\,d+7\,d^2\right )}{a^2\,f}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (2\,c^4+8\,c^3\,d-36\,c^2\,d^2+48\,c\,d^3-21\,d^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (4\,c^4+16\,c^3\,d-72\,c^2\,d^2+112\,c\,d^3-42\,d^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {16\,c^4}{3}+\frac {8\,c^3\,d}{3}-40\,c^2\,d^2+\frac {224\,c\,d^3}{3}-\frac {98\,d^4}{3}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {14\,c^4}{3}+\frac {16\,c^3\,d}{3}-44\,c^2\,d^2+\frac {256\,c\,d^3}{3}-\frac {97\,d^4}{3}\right )+\frac {80\,c\,d^3}{3}+\frac {8\,c^3\,d}{3}+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (2\,c^4-12\,c^2\,d^2+16\,c\,d^3-7\,d^4\right )+\frac {4\,c^4}{3}-\frac {32\,d^4}{3}+\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,c^4+8\,c^3\,d-36\,c^2\,d^2+64\,c\,d^3-25\,d^4\right )-16\,c^2\,d^2}{f\,\left (a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7+3\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+5\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+7\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+7\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+5\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+3\,a^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a^2\right )} \]

input
int((c + d*sin(e + f*x))^4/(a + a*sin(e + f*x))^2,x)
 
output
(d^2*atan((d^2*tan(e/2 + (f*x)/2)*(12*c^2 - 16*c*d + 7*d^2))/(7*d^4 - 16*c 
*d^3 + 12*c^2*d^2))*(12*c^2 - 16*c*d + 7*d^2))/(a^2*f) - (tan(e/2 + (f*x)/ 
2)^5*(48*c*d^3 + 8*c^3*d + 2*c^4 - 21*d^4 - 36*c^2*d^2) + tan(e/2 + (f*x)/ 
2)^3*(112*c*d^3 + 16*c^3*d + 4*c^4 - 42*d^4 - 72*c^2*d^2) + tan(e/2 + (f*x 
)/2)^4*((224*c*d^3)/3 + (8*c^3*d)/3 + (16*c^4)/3 - (98*d^4)/3 - 40*c^2*d^2 
) + tan(e/2 + (f*x)/2)^2*((256*c*d^3)/3 + (16*c^3*d)/3 + (14*c^4)/3 - (97* 
d^4)/3 - 44*c^2*d^2) + (80*c*d^3)/3 + (8*c^3*d)/3 + tan(e/2 + (f*x)/2)^6*( 
16*c*d^3 + 2*c^4 - 7*d^4 - 12*c^2*d^2) + (4*c^4)/3 - (32*d^4)/3 + tan(e/2 
+ (f*x)/2)*(64*c*d^3 + 8*c^3*d + 2*c^4 - 25*d^4 - 36*c^2*d^2) - 16*c^2*d^2 
)/(f*(5*a^2*tan(e/2 + (f*x)/2)^2 + 7*a^2*tan(e/2 + (f*x)/2)^3 + 7*a^2*tan( 
e/2 + (f*x)/2)^4 + 5*a^2*tan(e/2 + (f*x)/2)^5 + 3*a^2*tan(e/2 + (f*x)/2)^6 
 + a^2*tan(e/2 + (f*x)/2)^7 + a^2 + 3*a^2*tan(e/2 + (f*x)/2)))